<html>

  <body>

    <div>


    <p class="exciting-text">这是不无聊也不有趣的文字</p>
    <p class="boring-text">这是些无聊的文字</p>

    </div>

    <div class="category" title="请选择一个类目"></div>




  </body>
  
  <style>
    .exciting-text::after {
      content: " <- 让人兴奋!";
      color: green;
    }

    .boring-text::after {
      content: " <- 无聊!";
      color: red;
    }

    .category:empty::before {
      content: attr(title);  
    }

    

  </style>
</html>